<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            font-size: 50px;
        }
        .box1{
            width: 200px;
            height: 200px;
            background-color: #bfa;
            position: absolute;
            /* 
                开地定位后 可以用z-index设置层级
                1 2 3   3大3在上面
                    如果元素层级一样 优先显示 结构里最下面的

                    祖先元素再高 也不会盖住后代元素
            */
            z-index: 1;
        }
        .box2{
            width: 200px;
            height: 200px;
            background-color: rgba(225,0,0,.3);
            position: absolute;
            top: 50px;
            left: 50px;
            z-index: 2;

        }
        .box3{
            width: 200px;
            height: 200px;
            background-color: yellow;
            position: absolute;
            top: 100px;
            left: 100px;
            z-index: 3;
            vertical-align: ;

        }
    </style>
</head>
<body>
    <div class="box1">1</div>
    <div class="box2">2</div>
    <div class="box3">3</div>
</body>
</html>